package com.school_admin.mapper;

import com.school_admin.entity.Comment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 
 * @since 2024-03-18
 */
@Mapper
public interface CommentMapper extends BaseMapper<Comment> {
    @MapKey("id")
    List<Map> getCommentByPostId(String postId);
    @MapKey("id")
    List<Map> getCommentList(int start, int pageSize);
    int  getCommentCount();
    @MapKey("id")
    List<Map> getCommentListByKewWord(int start, int pageSize, String keyWord);

    int getCommentCountByKewWord(String keyWord);
}
